Release 10.1A: OpenEdge Development:
Progress Dynamics Web Development Guide


Overview of CSS rules

CSS files contain a list of rules that apply formatting to elements in an HTML page. Each rule has a selector and a declaration. The declaration contains property and value pairs. Figure 5–3 shows a simple rule that establishes the font size for all paragraph elements (<P>) in an HTML page.

Figure 5–3: CSS rule example

CSS supports three basic types of selectors. You can see the three basic types in rymain.css:

In addition to rules using basic selector types, rymain.css also contains rules that use selectors that match elements based on parent-child relationships. The selector in this type of rule is called a Contextual Selector.

For example, the selector in the following rule in rymain.css matches TD (table cell) elements that are descendants of an element whose ID attribute is toolbar:

#toolbar TD   {margin:0;padding:1px 3px 1px 3px;border:1px #D6D3CE solid} 

The selector in the following rule, also in rymain.css, shows the use of the greater-than symbol (>) to limit matching to direct descendants:

#menubar > TABLE   {margin:0pt;padding:0pt;background:#D6D3CE;} 

It is beyond the scope of this manual to go into more detail on CSS rules. If you implement style changes in your Progress Dynamics Web applications, you must be more familiar with the CSS specification. In particular, you must understand how CSS establishes precedence when a number of rules apply to the same element.

Again, if you need more information about CSS, a good source is the World Wide Web Consortium site at http://www.w3.org/Style/CSS/learning. It contains lists of books, online sources, and user groups.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095